home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-13
/
me_cd22.zip
/
DOC.ZIP
/
ME2.DOC
< prev
next >
Wrap
Text File
|
1992-04-27
|
48KB
|
1,036 lines
========================================================================
== ME2 Documentation Craig Durland 8/88 10/91 ==
========================================================================
ME2 is a medium-small, portable, extendable Emacs like editor. This
document describes how individual commands work - it is light on general
usage. If you need to learn Emacs, look at the GNU, Goslings or
Unipress Emacs manuals.
Copyright 1991 Craig Durland
Distributed under the terms of the GNU General Public License.
Distributed "as is", without warranties of any kind, but comments,
suggestions and bug reports are welcome.
========================================================================
== Soft keys and Function keys ==
========================================================================
When describing characters or keys, the character itself is used if it
is printable. Unprintable characters are made printable using 3 or more
printable characters. For example, the letter "A" is printable but
control-A is not and so the code "C-a" is used to describe it. The
table below shows the various codes needed to map the unprintable keys.
Prefix Meaning
C- Control key.
F- Function or soft key such as f1, Home, etc.
M- Meta key. See META in the GLOSSARY.
S- Shift. This only applies to function keys.
This is a list of "extended" keys - those not covered by ASCII. ME
maps these keys to 3 or more ASCII codes. Ignore the ME key column
unless you are binding keys. The keyboard column is the key on the
keyboard you press to generate the ME key which (unless rebound) fires
off the function listed in the Bound to column.
keyboard ME key Bound to
F1 F-1
F2 F-2
F3 F-3
F4 F-4
F5 F-5
F6 F-6
F7 F-7
F8 F-8
F9 F-9
F10 F-0
home F-A (beginning-of-buffer)
end F-B (end-of-buffer)
up arrow F-C (previous-line)
down arrow F-D (next-line)
right arrow F-E (next-character)
left arrow F-F (previous-character)
insert F-G
delete F-H (delete-character)
page up F-I (previous-page)
page down F-J (next-page)
clear line F-K (cut-line)
delete line F-L
insert line F-M
select F-N (set-mark)
roll up F-O (scroll-down)
roll down F-P (scroll-up)
DEL C-? (delete-character) (This is the DELete key)
ESC C-[
shift tab M-I
ALT 0..9A..Z! mapped to META 0..9A..Z!
Use the ALT key like the control key (ie hold it down while you press the
next key).
========================================================================
========================================================================
Case of letters:
Meta keys and Control X commands: next letter is ALWAYS uppercase.
Function keys are case sensitive.
========================================================================
== GLOSSARY ==
========================================================================
C-[ See META
args
Parameters or arguments that will be requested by the command. If
[] surround the arg, then it will only be requested in certain cases.
binding See bound.
bound
A key is attached or bound to a command or program.
If the key is pressed, whatever it is bound to is invoked.
Keys can be bound locally or globally. If a key has a local binding,
pressing the key in the buffer it was bound in causes action. A
global binding covers all buffers. Note that local bindings take
precedence over global ones.
buffer
A buffer is an internal workspace where changes are made to text. If
a buffer is visible, it is shown through one or more windows. It is
usually attached to a file (ie contains the contents of the file).
If the buffer was created by reading in a file, the buffer name is
created by removing the path from the file name (and leaving only
the name and extension).
clear
A operation where something is covered over by something else. Also
reset.
For example:
If text is cleared, it is covered by blanks.
If a mark is cleared, it is reset to an initial state (pointing to
nothing).
See also: cut, delete, clear.
command or cmd
A ME built in command such as (read-file).
These can be bound to a key to make executing them easier.
Documented under COMMANDS (in ME2.DOC). These are different from
functions in that they can be bound to keys or executed by
(ME-command).
Command completion
ME will attempt to complete a command if the space bar is pressed and
completion is on. The only time you can use command completion is
when you are being queried in the minibuffer. For example, when ME
is requesting a buffer name for (use-existing-buffer) and foobar is
a buffer, typing "foo" and hitting space will fill in the rest of
the name. ME also trys to fix typos. If you had typed "fooie" and
hit the space bar, you still get "foobar". Sometimes, you will hit
space and only part of the command name will appear. This is ME's
way of telling you there is some ambiguity as to the full name.
Type some more of the name and hit space again or press ? to get a
list of possible names.
See also: complete in ME2MUTT.DOC.
cut
A operation where something is saved and then removed.
For example: If text is cut, it is saved in the cut buffer and then
deleted. You can retreive it later from the cut buffer.
See also: cut buffer, delete, clear.
Cut buffer
An invisible buffer that holds things created by deletion commands
such as (cut-region) and (copy-region). Used to cut and paste, or
just cut, text.
If you want to move a block of text about: 1. set the mark at one
end and then move the dot to the other end. 2. cut the region. 3.
move the dot to the start of where you want the text to begin and 4.
yank the cut buffer. Bingo.
Copy and cut append to the cut buffer if last command was also a cut
or copy, otherwise the cut buffer is cleared before the new text is
entered.
The cut buffer is also used by (filter).
Other Emacs' refer to this as the kill buffer.
delete
A operation where something is removed and NOT saved.
For example: If text is deleted, it is gone and can't be recovered
(unless undo can be it back).
See also: cut, clear.
dot
The place between two characters. It is immediately to the left of
the cursor. Also known as point. One per window or buffer.
ESCAPE
See also META.
The escape key (usally marked ESC on keyboards) acts like the META key
for those keyboards that don't have a META key.
file
For MS-DOS, you can use forward slashes "/" as part of the path name.
function or fcn
The commands that comprise the Mutt programming language. Documented
in MUTT2.DOC and ME2MUTT.DOC. These differ from commands in that
they cannot be bound to keys and cannot be executed by (ME-command).
help
Help is pretty much limited to reading manuals or asking gurus.
Limited forms of online help are command completion (see above),
typing a ? when being asked a question (see "If you are being
asked a question" below), command completion and (describe-bindings).
keys
Keys are used to enter text and invoke commands. The keys used to
invoke can be one or two keys where each key can have one or more
modifiers.
modifier meaning notes
M- META See META and ESCAPE. Cannot be prefixed.
C- CONTROL
S- SHIFT Only used with nonASCII keys
F- FUNCTION NonASCII keys
See also: prefix-key in ME2MUTT.DOC
macro
A sequence of keystrokes that can be replayed on command. Used when
you don't want to spend the time writing a program. Created by
going through the motions (which are actually done so you can verify
that what you want to happen is actually happening) (see
(start-macro) and (end-macro)). When replayed by (execute-macro),
the exact sequence you typed in is replayed.
mark
A user settable dot.
A mark is remembered for the life of the buffer and stays where you
set it until you or ME moves it. (exchange-dot-and-mark) will get
you to the mark from anywhere in the buffer.
If the dot is at a mark and you do something (like insert text, yank
text, etc), it is done between the dot and mark, that is, the mark
is before the change and the dot after.
Advanced note: The marks are associated with a buffer NOT with the
windows attached to the buffer. Thus all windows attached to a
buffer have the same marks.
ME
ME2
The Mutt Editor. An editor that is extendable using the Mutt
programming langauge. ME2 is the follow on to ME.
message line or
minibuffer
The bottom line of the screen. This is the place where all questions
are asked, error messages sent, etc.
META key
This is a modifier key that works like the control key. Your keyboard
may or may not have one. On IBM PCs, this is the ALT key. To use,
hold down the META key and press the key you want to modify. If
your keyboard does not have a META key, use ESCAPE instead - press
the ESCAPE key, let it up and then press the key you want to modify.
In the ME documents, the META key will be refered to by M-x where x is
the key being modified.
Mutt
The built in programming language. Refer to the Mutt documentation in
MUTT2.DOC and ME2MUTT.DOC.
n nth
Argument prefix (set by (universal-argument)). This means repeat the
key (or what its bound to) or command n times. If
(universal-argument) is not used then n defaults to 1.
pgm See program.
point See dot.
program
A program created by (defun).
These are created by the user to make its editing easier.
See MUTT.DOC and ME2MUTT.DOC.
region
The area between two marks (usually the dot and the mark).
rectangle
The rectangler region between two marks. One mark is at the upper
left corner of the region and the other mark is at the lower right
corner. The width is measured in characters and the height in lines.
syntax tables are used to determine word boundaries, etc. All commands
work with words use these tables (eg (next-word). Use
(modify-syntax-entry) to change what it means to be a word.
sysvar or system variable
These are a collection of user changable variables that effect the way
ME does certain things.
Documented in ME2MUTT.DOC.
window
A portion of the screen. A window provides a view of a buffer. There
can be more than one window showing a buffer. Windows are separated
from each by a mode line. Mode lines look like:
-* ME2 -- buffer_name -- file_name -------------------------------
The * is present only if the buffer has been modified. The
file_name is present only if a file is associated with the buffer.
word
A string of letters, digits, "$", "'" or "_". By modifying the syntax
tables, you can change the definition of a word.
See syntax tables, (modify-syntax-entry).
Word wrap
When you are typing at the end of a line and cross the fill column the
last "word" is wrapped to the next line. If you have some left
margin you wish to preserve, bind CR to newline-and-indent
(bind-to-key "newline-and-indent" "C-m").
Setting the system var word-wrap to 0 turns it off, setting it to n
causes wrapping to occur at column n.
========================================================================
== If you are being asked a question ==
========================================================================
Key bindings are not in effect. This means if a normal key has been bound
to something wrong by accident, you can unbind it without undo grief.
"Special" keys:
C-h or Backspace Delete character left of the cursor.
C-g Abort out of the question. Also causes the command to be aborted.
C-j Same as C-m.
C-l Redraw the screen. Handy if you messed it up with help and want
to see the original contents.
C-m or return (enter) End the question and return your answer.
C-q Quote the next character. C-qC-j is the code for the end of a
line - if you search for "C-qC-jstart of line" you will find
"start of line" if it is the first thing on a line.
C-^ Quote next key (same as C-q)
? Show help (if available). This shows the possible responses for
this command. This is available whenever command completion is.
Space Command completion (if available for this command). You can
customize this key. See complete-key in ME2MUTT.DOC.
C-f Next character
C-b Previous character
C-a Begining of line
C-e End of line
C-u Delete everything and start over.
C-d Delete character
C-k Delete to end of line
M-f Next word
M-b Previous word
C-p Previous history
C-n Next history
C-r Search back though history
M-> Youngest history entry
M-< Oldest history entry
If you answer the question by hitting <return or enter> and the line is
empty, you have entered the null line zone. This can be interpreted as:
1. An empty line. It will then be ignored or complained about or
stop the command.
2. A C-m. (bind-to-key) does this.
3. A request to use the default. This is usually the current
thing being manipulated (where thing is buffer, file, etc).
eg (write-file) defaults to current file name and
(delete-buffer) defaults to current buffer name.
========================================================================
== NOTES ==
========================================================================
In this document, you will see command names surrounded by parens (eg
(beginning-of-line)). If the command is bound, you can execute the
command by pressing the keys it is bound to. For example,
(beginning-of-line) is bound to C-a, so holding down the control key
and pressing A will move the cursor the the beginning of the line. If
the command is not bound (or you don't remember or want to use the
binding), you can also execute the command by using (ME-command).
========================================================================
== COMMANDS ==
========================================================================
COMMAND name, default binding, args and comments
These all return a BOOLEAN.
Note: Some of commands listed are actually written in Mutt and thus are
NOT built in - they must be loaded. These are marked with a "*" at
the begining of the line. The Mutt file that they are defined in is
listed after the command. If you use the standard distrubution of
ME2, these should just work.
(abort) C-g
Back out of anything.
If remembering a macro, forget it.
If executing a program, stop it.
This only works when ME is waiting for a key press (ie it won't halt
pgms in a infinite loop or runaway pgms that aren't looking at the
keyboard).
(apropos) M-? args: keyword
List all commands and programs that have a keyword in them. For example,
if you apropos commands with "mark" in them you might get something like:
PROGRAMS:
mark-and-end F-B
mark-and-home F-A
COMMANDS:
exchange-dot-and-mark C-xC-x
set-mark C-@ M- F-N
On the left is the command name. On the right are the key(s) bound
to the command. So, in this case, (set-the-mark) is bound to
control-@, meta-space and softkey-N.
Command completion is on.
See also: (describe-bindings).
(beginning-of-buffer) M-<
Move the dot to the first character of the buffer.
See also: (end-of-buffer).
(beginning-of-line) C-a
Move the dot to the first character of the line.
See also: (end-of-line).
(bind-local-key) Not bound. args: command name, keystroke(s)
Same as (bind-to-key) but the binding is in effect only in the buffer it
was bound in.
Note that local bindings take precedence over global ones.
See: (bind-to-key)
(bind-to-key) Not bound. args: command name, keystroke(s)
Attach a key to a command or program. When ever the key is pressed,
the command or program will be executed (except when a question is
being asked).
Possible keys are single key strokes and combo keystrokes.
Combo keys are prefixed keys, softkeys or modified keys.
When asked for the key just press the key(s). You might have to use
C-q to quote the keys, in that case it often easier to just type
"C-a" if you mean control a.
If programming, use the keycode. Keycodes are ASCII (ie no control
characters and such) representations of a key. For example, META-D
is represented by the 3 characters M-d, control-C by ^C or C-c and
function key 1 (aka soft key 1) by F-1. Keycodes should be used
when programming to avoid screwing up things like printers (when you
print out the file). eg (bind-to-key "foo" "F-1").
To unbind a key, bind it to "". (bind-to-key "" "F-1") will remove
anything bound to F-1 and make F-1 self insert.
To unbind all keys, use (bind-to-key "clear-keymap") (note that you
don't need a keystroke arg). Be careful how you use this because
you can make it impossible to exit ME. "Regular" (noncontrol, etc)
keys become self inserting after clearing the keymap. ie "a" will
insert an "a".
Note: Always use uppercase for control keys if you use the ^ notation.
Command completion is on.
See also: (bind-local-key), (defun), keys (in the glossary above).
*(calculator) Not Bound calc.mut
A simple programmers calculator for those times when you don't want to
use the one sitting next to the keyboard. Supports arithmetic in
many different bases. For more info, run calculator and press "?".
*(capitalize-word) M-c case.mut
Capitalize word after dot.
If dot is between words, searches forward to the start of the next word
and capitalizes that one.
If the dot is in the middle of a word, the letter after the dot is
capitalized.
See also: (modify-syntax-entry), (upcase-region), (downcase-region),
(capitalize-region).
*(capitalize-region) Not Bound case.mut
Capitalize all words in a region.
If dot is between words, searches forward to the start of the next word
and capitalizes that one.
If the dot is in the middle of a word, the letter after the dot is
capitalized.
See also: (modify-syntax-entry), (upcase-region), (downcase-region),
(capitalize-word).
*(clear-rectangle) Not Bound me2.mut
Set the rectangle to blanks.
See also: (copy-rectangle), (cut-rectangle), (delete-rectangle).
*(compile) Not bound compile.mut
Run make (or a command of your choice (such as cc)), collect output in
a buffer and while the compile is running, optionally visit the
files that have errors.
See documentation in PACKAGE.DOC under "compile".
Notes:
Only works on machines running unix and the compute server.
Modeled after compile in GNU Emacs.
(copy-region) M-w
Copy a region to the cut buffer. If the last command was a cut
command, append to the cut buffer. The region is unaffected.
Returns TRUE if region copied, FALSE if no region, ABORT if the cut
buffer runs out of space.
See also: (cut-region), (yank).
*(copy-rectangle) Not Bound me2.mut
Copy a rectangle to the cut buffer.
See also: (cut-rectangle), (delete-rectangle), (clear-rectangle).
*(cut-the-line) F-5 me2.mut
Delete the entire line the cursor is on.
(cut-line) C-k or F-K (clear line)
Delete text from dot to the end of the line.
If an argument is given:
If n = 0: cut from beginning of line to dot.
If n > 0: cut forward over n newlines.
If n < 0: error.
The deleted text is put into the cut buffer or appended to the cut
buffer if the last command was also a cut command.
Other Emacs' call this kill-line.
See also: (cut-word), (cut-previous-word), (cut-region),
(yank).
(cut-previous-word) M-C-h (M-backspace)
Delete the previous word. Save them in the cut buffer.
See also: (modify-syntax-entry).
*(cut-rectangle) Not Bound me2.mut
Copy a rectangle and delete a rectangle to the cut buffer.
In GNU Emacs, this is called kill-rectangle.
See also: (copy-rectangle), (delete-rectangle), (clear-rectangle).
(cut-region) C-w
Delete a region and save it in the cut buffer. If the last command was
a cut command, append to the cut buffer.
See also: (copy-region), (delete-region), (cut-line),
(yank).
Other Emacs' call this kill-region.
(cut-word) M-d or M-C-? (M-DEL)
Delete a word. Save them in the cut buffer.
See also: (modify-syntax-entry).
*(delete-buffer) C-xk delbuf.mut
Remove a buffer. It disappears into ness-ness land. If the buffer
has been modified, ask before deleting. If the buffer is on the
screen, replace it with the (next-buffer). If it is the only
buffer, replace it with "*scratch*". If n, remove the window it was
displayed in.
Defaults to the current buffer.
Buffer name completion is on.
See also: (delete-current-windows).
(delete-character) C-d, C-? (DEL) or F-H (delete)
Delete the character after the dot (visually under the cursor). If at
the end of the line, the next line is joined to the current line. If
given an argument, deleted characters are put into the cut buffer.
If a Mutt program calls this, deleted characters are never put into
the cut buffer.
*(delete-current-window) C-x0 me2.mut
Delete the current window.
(delete-other-windows) C-x1
Make the current window the only window on the screen.
See also: (split-window).
(delete-previous-character) C-h (backspace)
Delete the character before the dot (visually to the left of the
cursor). If at the beginning of the line, the current line is
joined to the end of the previous line. If given an argument,
deleted characters are put into the cut buffer.
If a Mutt program calls this, deleted characters are never put into
the cut buffer.
*(delete-rectangle) Not Bound me2.mut
Delete the rectangle.
See also: (copy-rectangle), (cut-rectangle), (clear-rectangle).
(delete-region) Not bound
Delete a region. The region is NOT saved.
See also: (cut-region).
(describe-bindings) Not bound
List all commands and programs along with their key bindings in the same
format as (apropos).
See also: (apropos).
*(describe-key) Not Bound me2.mut
Tells you what a key is bound to.
*(downcase-region) C-xC-l case.mut
Convert a region to lower case.
See also: (upcase-region), (downcase-word), (upcase-word).
*(downcase-word) M-l case.mut
Convert word to lower case.
See (capitalize-word) for edge conditions.
See also: (modify-syntax-entry), (upcase-word), (downcase-region),
(upcase-region).
(end-macro) C-x)
Stop remembering keystrokes. The keystrokes are stored in the macro
buffer ready to be replayed by (execute-macro).
See also: (execute-macro), (start-macro).
(end-of-buffer) M->
Move the dot to the bottom of the buffer.
See also: (beginning-of-buffer).
(end-of-line) C-e
Move the dot to the end of the line.
See also: (beginning-of-line).
(exchange-dot-and-mark) C-xC-x
Move the dot to the mark and set the mark to old dot value. Visually,
move to where the mark was set. Repeating this command will undo it.
See also: (set-the-mark).
(execute-macro) C-xe
Replay the keystrokes saved in the macro buffer.
See also: (start-macro), (end-macro).
(exit) C-c C-xC-c args: [yes or no]
Exit ME. If there is a modified buffer (one that has changed since it
was last saved), you are asked about it.
If n, quit no matter what and without making any noise.
*(fill-paste-buffer) Not bound me2.mut
Put the region into the paste buffer. This acts just like
(copy-region) but uses the paste buffer instead of the cut buffer.
Use (yank-paste-buffer) to insert buffer.
See also: (yank-paste-buffer).
*(filter) Not bound filter.mut
Take a region and feed it to a filter as standard input.
Take the output of the filter and use it to replace the region.
For example: If the region is a list of words and sort is a program
that sorts text then (filter "sort") will replace the region with
a sorted copy.
If you don't want to remove anything, use universal argument (C-u) or
make a null region (set the mark at the dot). eg C-u (filter "ls")
will insert a directory listing at the dot.
The region is saved in the cut buffer.
See OS-filter (in ME2MUTT.DOC) for info on environment variables.
*(findit) Not bound findit.mut
Search or search and replace across many files.
See documentation in PACKAGE.DOC under "findit".
See also: grep.
*(forward-re-search) M-C-s search.mut
Same as (forward-search) but using regular expressions.
See REGEXP.DOC for regular expression syntax.
See also: (query-replace), (forward-search), (reverse-re-search).
in ME2MUTT.DOC: case-fold-search, get-matched, looking-at
*(forward-search) Not Bound search.mut
Search for a string.
CR ends patterns, LF (^J) => end of line.
The pattern is saved across searches.
(forward-search) The dot is after the last character matched.
(reverse-search) The dot is before the last character matched, or put
another way, to the left of the first character of the search string.
Examples:
To search for "foobar", type: foobar<Enter>
To search for "foobar"<end of line>, type: foobar^Q^J<Enter>
To search for <start of line>"foobar", type: ^Q^Jfoobar<Enter>
Note that, in this case, the very first line will not match (this
is because the first line has no preceeding line and therefore no
end of line marker before it).
See also: (reverse-search), (forward-re-search), (isearch),
(query-replace), (re-query-replace), case-fold-search (in ME2MUTT.DOC)
*(get-sysvar) Not Bound sysvar.mut
Display the value of a ME2 system variable.
See ME2MUTT.DOC for a list and what they do.
Command completion is on.
See also: (set-sysvar).
*(Goto-line) M-g me2.mut
Move the dot to the beginning of the nth line in the current buffer.
First line of the buffer is 1. If n is negative, got the nth line
from the end of the buffer.
Returns FALSE is try to move off either end of the buffer. In that
case the dot is left at the buffer edge it tried to move accross (at
the start of the line).
Notes:
Line 0 does not really exist so (goto-line 0) returns FALSE. If you
ignore the error, (goto-line 0) is the same as (goto-line 1).
See also: goto-line (in ME2MUTT.DOC).
*(grep) Not bound compile.mut
Run grep, collect output in a buffer and while the grep is running,
visit all the files grep finds matches in.
See documentation in PACKAGE.DOC under "compile".
Notes:
Only works on machines running unix and the compute server.
Modeled after grep in GNU Emacs.
See also: findit.
*(grow-window) C-x^ window.mut
Enlarge the current window by a line.
See also: (shrink-window).
*(hanoi) Not Bound ganoi.mut
A towers of hanoi solver that shows the disks moving around.
To load it: M-x load <Enter> ganoi <Enter>
See also: (Queens).
*(indent-rigidly) C-xC-i indent.mut
Shift a block left or right.
A block is all the lines of text between the dot and mark inclusive.
With no arg: asks for the amount to shift the region. Positive
for right shift, negative for left shift.
With arg (ie C-u): shifts the region by the difference between the dot
and the first nonblank character on that line.
eg use this to shift the top line of the region over to the cursor.
Removes white space from blank lines.
When doing a negative shift, text won't be shifted left of the left
margin.
(insert-file) C-xi args: file name
Insert a file into the buffer at the dot. The file is unaffected.
Command completion is on.
See also: (read-file), (visit-file), (write-file).
*(insert-file-name) Not bound me2.mut
Use command completion to get a file name and insert the name at the
dot.
*(isearch-forward) C-s or C-\ isearch.mut
Search as you type - shows you where the string you have typed so far
would be found.
Keys:
C-h (Backspace): Remove the last character from the search pattern.
Don't move.
C-s: Search forward for existing pattern. If haven't entered a
pattern, the old pattern is used.
C-\: Same as C-s.
C-r: Search reverse for pattern.
C-q: Quote the next character into the search pattern. Useful for
searching for control characters (like tab).
C-w: Add the rest of the word to the search pattern.
C-g: Exit search.
C-m (Enter): Drop to non incremental search if haven't done anything
yet.
Control characters and combo keys (eg cursor motion, C-x=, etc)
terminate the search. The key is then executed. For example,
searching for text and then pressing C-p will cause the cursor to
move to the line above the matched text.
If you want to call isearch from a Mutt program, prime and start
searching, just pass in a search string. eg (isearch TRUE "foobar")
will start a incremental search at the point and search for foobar.
Use FALSE to search backwards.
See also: (isearch-reverse), (forward-search).
*(isearch-reverse) C-r isearch.mut
See (isearch-forward) for info.
*(list-buffers) C-xC-b bstats.mut
List all the buffers currently in ME along with some info about them.
For example:
Flags Size Buffer File
----- ---- ------ ----
.--- 81 *Help*
-u-- 2732 bstats.mut /users/craig/tools/me2/mutt/bstats.mut
Mu-- 37434 me2.doc /users/craig/tools/me2/doc/me2.doc
40527 bytes (943 lines) in 3 buffers.
Here is what the flags (MuhH) mean:
M : M if the buffer has been modified and we care.
u : u if undo is turned on.
H : if the buffer is "hard" hidden.
h : if the buffer is "soft" hidden.
If any of the flags is off, a "-" is used in place of the letter
(except for modified where a "." is used).
See also: (show-buffer-stats)
(load) Not bound args: code-file-name
Load a Mutt executable code file compiled with the Mutt compiler (MC2).
The file "me2.mco" is loaded when ME2 is fired up (unless it does not
exist).
Where the file is looked for is controled by the environment variable
"ME2". If it doesn't exist, the current directory is searched. If
it does exist, it is parsed just like the UNIX ksh PATH variable:
If code-file-name has a slash in it, the ME2 path is not searched.
Everything between sepraters (":" on UNIX, ";" on MS-DOS) is a path.
If path starts with ":", the current directory is searched first.
If path ends with ":", the current directory is searched last.
MS-DOS only:
"/" and "\" are treated the same way - as "\".
If code-file-name starts with a drive (eg "A:"), the ME2 path is
not searched.
For example: ME2=$HOME/mutt:.:/usr/local/lib/mutt
When (load "foo") is done, ME will try to load
"$HOME/mutt/foo.mco", "./foo.mco" and
"/usr/local/lib/mutt/foo.mco" in succession.
Notes:
The extension MUST be ".mco" and is optional (ie you don't have to
include it and if you do, I'll change it to ".mco").
With an arg prefix (ie C-u) there is no error message if the file
can't be found.
If the arg prefix is 42, I check to see if the file has already been
loaded - if it has been, I won't load it again.
Warnings:
A pgm should NOT try to load it self or the file it is defined in
(eg if foo is defined in bar.mut, foo should not try to (load
"bar"). This is because the old bar is discarded (to make room
for the new code) before foo finishes running (ie foo is thrown
away). Depending on the OS, this may work but your asking for
trouble if you do it.
If a code file is loaded that has the same name (ignoring path) as
an already loaded code file, it overwrites the old file. All keys
bound to functions in the old file are removed. See autoload.mut
for more about load and late binding.
See also: documents on Mutt programming (MUTT2.DOC and ME2MUTT.DOC).
(ME-command) M-x args: command or program name
Run a command or program. ie one of the things listed in this
document. When asked what to Execute: use the name as listed here
(without the "()"'s). eg Execute: describe-bindings
Command completion is in effect.
(newline) C-m
Insert a newline before the dot (visually before the cursor).
See also: (newline-and-indent), (open-line).
(newline-and-indent) C-j or M-C-o (oh, not zero)
Insert a newline before the dot and duplicate the indentation of the
previous line (the one the dot just left).
Note: if tab-stops is 0, tabs are used where possible. Otherwise
only blanks are used.
See also: (newline), (open-line), tab-stops (ME2MUTT.DOC).
*(next-buffer) F-2 hidebuf.mut
Replace the current buffer with the next buffer in the buffer list,
skipping the hidden buffers. The buffer list is in alphabetical
order. The buffer list is circular, ie, the last buffer is followed
by the first buffer.
See also: (list-buffers), (switch-to-buffer), (use-existing-buffer).
(next-character) C-f or F-E (right arrow)
Move right a character.
See also: (previous-character).
*(next-file) C-xf nextfile.mut
Read the next file on the command line. By default, ME only reads the
first file on the command line. This command will read the next
one. Note that wildcards must be expanded by the shell (MS-DOS
users take note).
Use C-u to read in lots of files at once.
(next-line) C-n or F-D (down arrow)
Move the dot vertically down the screen. Trys to stay in the same
column.
Note:
Don't use this in a pgm unless you want column tracking (for example
binding an arrow key). In most cases the column tracking gets in
the way and will confuse your pgm. Use forward-line instead.
(see ME2MUTT.DOC).
See also: (forward-line), (previous-line).
(next-page) C-v or F-J (page down)
Scroll forwards a page (window size -2).
See also: (previous-page).
(next-window) C-xo (oh, as in other)
Move to the next window down the screen and make it the current window.
See also: (previous-window)
(next-word) M-f
Move forwards until dot is after the end of a word or end of buffer.
See also: glossary, (previous-word), (cut-previous-word),
(cut-word), (modify-syntax-entry).
*(not-modified) Not bound me2.mut
Reset the modified bit on the current buffer.
(open-line) C-o (oh, not zero)
Insert a newline after the dot. The dot does not move.
See also: (newline), (newline-and-indent).
*(p-match) F-6 pmatch.mut
Paren matcher. Works on (){}.
Put the cursor at a paren, execute p-match. The cursor is moved to
the matching paren, sits there for a while so you can see the
matching paren and then curor is restored. The mark is left at the
matching paren so you can (exchange-dot-and-mark) at your convience.
(previous-character) C-b or F-F (left arrow)
Move the dot backwards by a character.
See also: (next-character).
(previous-line) C-p or F-C (up arrow)
Move the dot vertically up the screen. Tries to stay in the same
column.
Note:
Don't use this in a pgm unless you want column tracking (for example
binding an arrow key). In most cases the column tracking gets in
the way and will confuse your pgm. Use forward-line instead.
(see ME2MUTT.DOC).
See also: (forward-line), (next-line).
(previous-page) M-v or F-I (page up)
Scroll backwards a page (window size -2).
See also: (next-page).
(previous-window) C-xp
Move to the window immediately above the current window and make it the
current window.
See also: (next-window).
(previous-word) M-b
Move backwards until dot is at the beginning of a word or beginning of
buffer.
See also: (cut-previous-word), (cut-word), (next-word),
(modify-syntax-entry).
*(Queens) Not Bound queen.mut
A "how do you place N queens on a NxN chess board so they don't attack
each other?" solver that shows the queens moving around.
To load it: M-x load <Enter> queen <Enter>
See also: (hanoi).
*(query-replace) M-% or M-q qr.mut
Interactively search and replace strings.
If the replacements are successful, the cursor is left where the
replace started and the mark is after the last replacement.
If aborted, the cursor is left where the abort occurred and the mark is
where the replace started.
n : No, don't replace. Go on to next match.
<SPACE>, y : Yes, replace and go to next match.
! : Replace all the rest without asking.
C-g : Abort. The command stops and the cursor is left where it is. To
get to the start of the query-replace, use (exchange-dot-and-mark).
? : Popup a window with some documentation in it.
C-l : Redraw the screen and put the cursor in a "reasonable" place.
A few others. Use "?".
If you hit a character not in the list, the query-replace stops.
Patterns are saved across searches.
If you want to call this from a Mutt program, the optional args are:
(query-replace search-pattern replace-pattern)
Note that the query-replace remains interactive.
See also: (re-query-replace), search-replace (ME2MUTT.DOC),
case-fold-search (in ME2MUTT.DOC).
(quote) C-q or C-^ (control-^)
Insert the next character typed into the buffer. This is how to get
control characters and the like into the buffer.
Note: If you quote ALT keys or softkeys it will be pretty boring.
*(re-query-replace) M-C-q qr.mut
Same as (query-replace) but using regular expressions.
See REGEXP.DOC for regular expression syntax.
See also: (query-replace), case-fold-search (in ME2MUTT.DOC)
(read-file) C-xC-r args: file name, [yes or no]
Clear the current buffer (asking if the buffer has been modified) and read
in a file.
The file name defaults to the file name of the current buffer.
Command completion is on.
See also: (insert-file), (visit-file), (write-file) and read-file-hook
(in ME2MUTT.DOC).
(refresh-screen) C-l
Repaint the screen. If n, then center the dot vertically in the window.
See also: (reposition-window).
*(rename-buffer) Not bound me2.mut
Change the name of the file that is attached to the current buffer.
After you do this, saving the buffer will cause it to write to the new
file name.
If you want to detach the buffer from the file system, use "" as the
new file name.
(reposition-window) M-!
Move the current window so that the line the dot is on is n lines
from the top of the window. The default is to move the line the dot
is on to the top of the window.
If n < 0, move the dot so that it is n lines from the bottom.
If n == 0, the dot is centered vertically centered in the window.
See also: (refresh-screen).
*(reverse-re-search) Not Bound search.mut
Same as (reverse-search) but using regular expressions.
See REGEXP.DOC for regular expression syntax.
See also: (reverse-search), (forward-re-search).
*(reverse-search) Not Bound search.mut
See (forward-search) for info.
(save-buffer) C-xC-s
Write the current buffer to the file associated with it. Does not
do anything if the buffer is unmodified. If you want to force a write,
use (write-file).
See also: (write-file).
(scroll-down) C-xC-n or F-O (oh) (roll up)
Move the current window down by a line. Visually, the dot moves up the
screen.
(scroll-up) C-xC-p or F-P (roll down)
Move the current window up by a line. Visually, the dot moves down the
screen.
(set-the-mark) C-@ or M-SPACE or F-N (select)
Set the mark at the dot. Visually, under the cursor.
See also: (exchange-dot-and-mark).
*(set-sysvar) Not Bound sysvar.mut
Set a ME2 system variable.
See ME2MUTT.DOC for a list and what they do.
Command completion is on.
See also: (get-sysvar).
(shell-command) C-x! args: op sys command
Call the operating system to perform a command or run a program and then
return to editing.
MS-DOS example: To copy a file: (shell-command "copy foo bar")
To get a directory listing: (shell-command "ls").
See also: (filter), (spawn-shell), enter-ME-hook and leave-ME-hook
(in ME2MUTT.DOC).
*(shell-region) Not bound me2.mut
Use the region as input to (shell-command).
For example:
foo.c has a comment in it that shows how to compile:
/* cc -o foo foo.c -lX11 */
By setting dot and mark around the text and using shell-region, you
can compile foo.
See also: (shell-command).
*(show-buffer-stats) C-x= bstats.mut
Display some info about the current buffer.
*(shrink-window) C-xC-z window.mut
Shrink the current window by a line. With an arg, shrink by that many
lines.
See also: (grow-window), window-height (ME2MUTT.DOC).
(spawn-shell) C-z
Jump to the operating system shell for a while. ME is still loaded
and will sit in the background until you exit the shell (via "exit"
in MS-DOS).
In UNIX and MS-DOS, you can specify your shell with the SHELL
environment variable (eg set SHELL=MUSH.EXE).
On UNIX systems that support job control, C-uC-z will suspend ME. This
is (usually) much faster than forking a new shell (use the fg
command (or equivalent) to return to ME). A major drawback of this
is trying to use it from a shell that does not support job control
(such as sh) or from a program (such as mail) that fired off ME via
the C system() command (it uses sh). In these cases the shell hangs
and it is difficult to recover.
See also: (shell-command), (filter), enter-ME-hook and leave-ME-hook
(in ME2MUTT.DOC).
(split-window) C-x2
Make 2 windows out of the current window. A window with less than 3
lines cannot be split.
See also: (delete-other-windows).
(start-macro) C-x(
Start remembering keystrokes until (end-macro).
(abort) will terminate and back out of the macro.
See also: (end-macro), (execute-macro).
(switch-to-buffer) C-xb args: buffer name
Replace the current window with another buffer.
Buffer name completion is on.
See also: (list-buffers), (next-buffer), (use-existing-buffer).
(tab) C-i or the tab key
Insert tab(s).
Move to the next tab stop. With argument, move n tabs.
To set the tab stops, see tab-stops in ME2MUTT.DOC.
*(turn-on-undo) Not Bound undo.mut
Turn on undo for a buffer. This has usually already been done.
See also: (undo)
*(twiddle-about-dot) Not Bound twiddle.mut
Transpose the two characters on either side of the dot (cursor).
*(twiddle-left-of-dot) C-t twiddle.mut
Transpose the two characters left of the dot (cursor).
*(undo) C-xu or C-_ undo.mut
Undo the last change to the buffer. May not be turned on for some
buffers.
Undo won't undo the following things:
cursor movement, buffer clears, file reads.
See also: (turn-on-undo), Undo.article.
(universal-argument) C-u
Get a numeric count for the next command. The next command or program
is performed count times. If the command is a self-insert, count
copies of the character are inserted.
Count starts at 4 (except as noted below). If the first key pressed
after C-u is "-", count becomes negative. Pressing C-u multiplies
count by 4. If a non digit is pressed, whatever is bound to that
key is performed count times. Otherwise, count becomes the next
digits pressed.
For example, C-uC-f will move forward 4 characters, C-uC-uC-f 16
characters, C-u123 123 characters. C-u5@ will insert "@@@@@".
If (universal-argument) is given an argument, the count starts there.
For example, in some Emacses, META digit starts the count at digit.
See arg-prefix in ME2MUTT.DOC for how to implement this.
(universal-argument) ignores running programs and will read from the
keyboard. Use arg-prefix if you wish pass an argument to something.
See also: arg-prefix (in ME2MUTT.DOC).
*(upcase-region) C-xC-u case.mut
Convert a region to upper case.
See also: (downcase-region), (downcase-word), (upcase-word).
*(upcase-word) M-u case.mut
Convert word to upper case.
See (capitalize-word) for edge conditions.
See also: (modify-syntax-entry), (downcase-word), (downcase-region),
(upcase-region).
*(use-existing-buffer) C-xC-o (oh) me2.mut
Replace the current window with a buffer that already exists.
Buffer name completion is on.
See also: (list-buffers), (switch-to-buffer).
(version) Not bound
Show the version of ME2.
(visit-file) C-xC-f or C-xC-v args: file name
Pull a file into a buffer for editing. The current window is used to
hold new buffer. If arg-prefix, the window is split (if it is the
only one) or another window is used to hold the new buffer. If the
file has been already loaded, switch to it. Otherwise, read in the
file. A buffer name is created from the file name by stripping off
the directory info and keeping the name and extension. The dot is
set to the beginning of the buffer and the marks are cleared (if
this is a new buffer).
If the buffer already exists but the filenames are different (eg "foo"
and "../foo" both generate the buffer name "foo"), a unique buffer
name is constructed by appending "<2>", "<3>", etc, using the lowest
number that makes a name not already in use.
Command completion is on.
See also: (insert-file), (read-file), (write-file) and read-file-hook
(in ME2MUTT.DOC).
(write-file) C-xC-w args: file-name
Write the current buffer to a file. If the file exists, it is
overwritten. If the file does not already exist, it is created.
file-name defaults to the file name of the current buffer.
Note that the buffer name and file name do NOT change. Some Emacses
change the file name to file-name. If you like this behavior, try:
(defun write-named-file
{(rename-buffer (ask "Write named file: "))(write-file "")})
Command completion is on.
See also: (insert-file), (read-file), (save-buffer), (visit-file).
(yank) C-y
Insert the contents of the cutbuffer before the dot (visually before the
cursor). Does not affect the cut buffer.
The dot is left after the yanked text. The mark does not move.
See also: (copy-region), (cut-line), (cut-region).
*(yank-paste-buffer) Not bound me2.mut
Insert the contents of the paste buffer at the dot. This acts just
like (yank) but uses the paste buffer instead of the cut buffer.
I bind this to M-y.
See also: (fill-paste-buffer).